import React from 'react'
import { Navigate } from 'react-router-dom'

export default function AuthRoute(props) {
  return (
    <>
        {
            localStorage.getItem('token')? props.children : <Navigate to='/login'></Navigate>
        }
    </>
  )
}
